#include<bits/stdc++.h>
#define ll long long
#define ull unsigned long long
using namespace std;
using point = pair<int, int>;
const int N = 1e6 + 10, INF = 0x3f3f3f3f;


int n;
point a[N];
map < pair<int, int>, vector<pair<point, point>>> mp;

int gcd(int a, int b) { return b ? gcd(b, a % b) : a; }
pair<int, int>  getk(pair<int, int> p1, pair<int, int> p2)
{
    int b = p2.second - p1.second, a = p2.first - p1.first;
    int d = gcd(b, a);
    return { b / d,a / d };
}

bool check(pair<point, point> t1, pair<point, point> t2)
{
    auto [p1, p2] = t1;
    auto [p3, p4] = t2;

    auto len2 = [](point a, point b) {
        int dx = a.first - b.first;
        int dy = a.second - b.second;
        return dx * dx + dy * dy;
        };

    if (len2(p1, p2) != len2(p3, p4)) return false;

    int vx1 = p2.first - p1.first;
    int vy1 = p2.second - p1.second;
    int vx2 = p3.first - p1.first;
    int vy2 = p3.second - p1.second;
    if (vx1 * vy2 - vy1 * vx2 == 0) return false;

    return true;
}

inline int read()
{
    int x=0,f=1;
    char ch=getchar();
    while(ch<'0'||ch>'9')
    {
        if(ch=='-') f=-1;
        ch=getchar();
    }
    while(ch>='0' && ch<='9')
    x=x*10+ch-'0',ch=getchar();
    return x*f;
}

void solve()
{
    n = read();
    for (int i = 1;i <= n;i++)a[i].first = read(), a[i].second = read();
    for (int i = 1;i <= n;i++)
        for (int j = i + 1;j <= n;j++)
            mp[getk(a[i], a[j])].push_back({ a[i],a[j] });

    ll ans = 0;
    for (auto& [x, g] : mp) {
        ans += g.size() * (g.size() - 1) / 2;
    }

    ll cnt = 0;
    for (auto& [_, g] : mp) {
        int m = g.size();
        for (int i = 0;i < m;i++)
            for (int j = i + 1;j < m;j++)
                if (check(g[i], g[j])) cnt++;
    }

    cout << ans - cnt / 2;
}

signed main()
{
    //ios::sync_with_stdio(0);
    //cin.tie(0);cout.tie(0);
#define ONLINE_JUDGE
#ifndef ONLINE_JUDGE
    std::istringstream in(R"()");
    std::cin.rdbuf(in.rdbuf());
#endif
    int T = 1;
    //cin>>T;
    for (int i = 1;i <= T;i++) {
        solve();
    }
}